package com.wishwall.helpers;

import java.io.File;
import java.text.SimpleDateFormat;

public class Constants {

    // Testing constants
    public static final String PRIVATE_STORAGE_ARCHIVES_LOCATION = "archives/";
    public static final String PRIVATE_STORAGE_ISSUE_LOCATION = "issues";
    public static final String PRIVATE_STORAGE_ISSUE_ARCHIVE_LOCATION = PRIVATE_STORAGE_ISSUE_LOCATION
            + File.separator + "issue.zip";

    // Intent constants
    // key for destinationPath property passed in intent extras
    public static final String DESTINATION_PATH = "destinationPath";
    // key for url property passed in intent extras
    public static final String URL = "url";
    // key for issueId property passed in intent extras
    public static final String ISSUE_CODE = "issueId";
    // key for FullScreenGallery's image locations
    public static final String FULL_SCREEN_GALLERY_IMAGE_LOCATIONS = "imageIds";
    // key for boolean flag indicating if once downloaded zip should be overwritten upon download.
    public static final String OVERRIDE_FILE_ON_DOWNLOAD = "overrideFile";
    // key for article
    public static String ARTICLE_TAG = "articleTag";
    // key for category
    public static String CATEGORY_TAG = "categoryTag";
    // key for video location
    public static final String VIDEO_LOCATION_TAG = "videoLocationTag";
    // key from serviceDownloadListener
    public static final String SERVICE_DOWNLOAD_LISTENER_TAG = "serviceListenerTag";
    // key for notification
    public static final String FROM_NOTIFICATION = "fromNotification";
    // key for returning to list isues
    public static final String LIST_ISSUE_RETURN_TAG = "returnToListIssue";
    // key for error on download
    public static final String DOWNLOAD_ERROR = "downloadError";

    // Web Service constants

    public static final String LIST_ISSUES_PATH = "content/%s/issues?limit=%s&account=%s";
    public static final String GET_ISSUES_PATH = "content/%s?account=%s";

    public static final String REGISTER_DEVICE_PATH = "devices/device/platform=%s/brand=%s";
    public static final String MODIFY_DEVICE_PATH = "devices/device/deviceUid=%s";

    public static final String SUBMIT_SURVEY_PATH = "survey/answers/surveyName=%s";

    // Error Reporting Web Service constants

    public static final String REGISTER_ERROR_REPORT_PATH = "errors/error";

    // the max amount of issues returned from listIssues web service
    public static final String RETURNED_ISSUES_LIMIT = "12";

    // Properties file keys

    public static final String SERVER_ADDRESS_KEY = "serverEndpoint";
    public static final String DEFAULT_COVER_LOCATION_KEY = "defaultCoverLocation";
    public static final int START_NEWS_REQUEST = 1800;
    public static final int START_NEWS_RESULT_CLOSE = 1801;
    public static final int START_NEWS_RESULT_DO_NOT_CLOSE = 1802;

    public static final String STARTING_SCREEN_HANDLE_START_KEY = "startingScreenHandle_start";

    // CaroucelGallery constants

    public static final String ILLEGAL_STATE = "imageLocations should be declared before the adapter";

    // UnzipAsyncTask constants

    public static final String COMMON_LAYOUT_PATH = "/system_category/system_article/common_layout";

    // Notifications constants
    // TODO use better ids
    public static final int ISSUE_RECEIVED_NOTIFICATION_ID = 1;
    public static final int ISSUE_DOWNLOADED_NOTIFICATION_ID = 2;

    // Non-existing file extension constant
    public static final String NO_SUCH_FILE_EXTENSION = "noSuchFileExtension";

    // Select issue download folder constants
    public static final String RESULT_STRING = "result";
    public static final String FILE_FILTER = "fileFilter";

    // c2dm constants

    public static final String C2DM_RECEIVE = "com.google.android.c2dm.intent.RECEIVE";
    public static final String C2DM_REGISTRATION = "com.google.android.c2dm.intent.REGISTRATION";
    public static final String C2DM_REGISTER = "com.google.android.c2dm.intent.REGISTER";
    public static final String C2DM_SENDER_ID = "android.musala@gmail.com";
    public static final String C2DM_REGISTRATION_ID_KEY = "c2dmRegistrationId";

    // Facebook sharing constants
    public static final String FACEBOOK_LINK = "facebookLink";
    public static final String FACEBOOK_PICTURE = "facebookPicture";
    public static final String FACEBOOK_NAME = "facebookName";
    public static final String FACEBOOK_DESCRIPTION = "facebookDescription";
    public static final String FACEBOOK_TOKEN = "accessToken";
    public static final String FACEBOOK_EXPIRES = "accessExpires";
    public static final String FACEBOOK_KEY = "facebookCredentials";
    public static final String FACEBOOK_APP_ID = "112251172220528";

    // E-mail sharing constants
    public static final String EMAIL_ISSUE = "Брой: ";

    public static final String SLIDE_TEMPLATE_NAME = "SlideLayout";

    public static final String COMMON_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";
    public static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat(COMMON_DATE_FORMAT);

    public static final String DISPLAY_DATE_FORMAT_STRING = "dd/MM/yyyy";
    public static final SimpleDateFormat DISPLAY_DATE_FORMAT = new SimpleDateFormat(
            DISPLAY_DATE_FORMAT_STRING);

    // Shared Preference constants
    public static String DEVICE_ID_KEY = "deviceId";

    public static final String TABLET_PLATFORM_CODE = "4";
    public static final String LARGE_PHONE_PLATFORM_CODE = "2";
    public static final String SMALL_PHONE_PLATFORM_CODE = "1";
    public static final String OS = "android";
    public static final long SURVEY_CODE = 123;
    public static final String SURVEY_NAME = "ivestnik_survey";

}
